





<div class="x-body">
    <form class="layui-form form_single" action="{:url()}" method="post">
        <div class="layui-form-item">
            <label for="name" class="layui-form-label">
                <span class="x-red">*</span>名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="name" name="name" required="" lay-verify="required"
                       autocomplete="off"  value="{$info['name']|default=''}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>系统后台显示菜单名称
            </div>
        </div>

        <div class="layui-form-item">
            <label for="sort" class="layui-form-label">
              排序值
            </label>
            <div class="layui-input-inline">
                <input type="number" id="sort" name="sort" value="{$info['sort']|default=0}"  lay-verify="pass"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                （用户菜单的排序，默认为 0）
            </div>
        </div>

        <div class="layui-form-item">
            <label for="link" class="layui-form-label">
                <span class="x-red">*</span>链接
            </label>
            <div class="layui-input-inline">
                <input type="text" id="link" name="url" value="{$info['url']|default=''}"  lay-verify="pass"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                （url函数解析的URL或者外链）
            </div>
        </div>
        <div class="layui-form-item">
            <label for="pid" class="layui-form-label">
                <span class="x-red">*</span>上级菜单
            </label>
            <div class="layui-input-inline">

                <select id="pid" name="pid">
                    <option value="0">顶级菜单</option>
                    {volist name='menu_select' id='vo'}
                    <option value="{$vo.id}">{$vo.name}</option>
                    {/volist}
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                （所属的上级菜单）
            </div>

        </div>
        <div class="layui-form-item">
            <label for="icon1" class="layui-form-label">
                图标
            </label>
            <div id="icon1" class="layui-input-inline">
                {assign name="icon" value="$info.icon|default=''" /}
                {:widget('icon/index', ['name' => 'icon', 'value' => $icon])}
            </div>
            <div class="layui-form-mid layui-word-aux">
                （菜单小图标，为空则显示系统默认图标）
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">是否隐藏</label>
            <div class="layui-input-block">
                <input type="radio" name="is_hide" value="1" title="是">
                <input type="radio" name="is_hide" value="0" title="否" checked>
            </div>
            <div class="layui-form-mid layui-word-aux">
                （若隐藏则在菜单中不显示）
            </div>
        </div>
        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">快捷操作</label>-->
            <!--<div class="layui-input-block">-->
                <!--<input type="radio" name="is_shortcut" value="1" title="是">-->
                <!--<input type="radio" name="is_shortcut" value="0" title="否" checked>-->
            <!--</div>-->
            <!--<div class="layui-form-mid layui-word-aux">-->
                <!--（若为快捷操作则会出现在后台上方顶部菜单栏）-->
            <!--</div>-->
        <!--</div>-->

        <div class="box-footer">

            <input type="hidden" name="id" value="{$info['id']|default='0'}"/>

            <button type="submit"  class="layui-btn ladda-button ajax-post" data-style="slide-up" target-form="form_single">
                确 定
            </button>
            <a class="layui-btn ladda-button" href="{:url('menuList')}"><i class="fa fa-history"></i> 返 回</a>

        </div>

    </form>
</div>



<script type="text/javascript">

    ob.setValue("is_hide", {$info.is_hide|default=0});
    ob.setValue("is_shortcut", {$info.is_shortcut|default=0});
    ob.setValue("pid", {$info.pid|default=0});

</script>